SNextTypeSRsrc
SNextTypeSRsrc Return information about sResources of a specified type.
#include <Slots.h> Slot Manager
SpBlockPtr spBlkPtr ; address of 56-byte Slot Parameter Block
structure
returns Error Code; 0=no error
SNextTypeSRsrc behaves the same as SNextSRsrc except that it returns
information only about sResources of the specified type.
spBlkPtr is the address of a 56-byte Slot Parameter Block structure.
The relevant fields are as follows:
Out-In Name Type Size Offset Description
¨ spsPointer Ptr 4 4 Structure pointer
¨ spIOReserved short 2 36 Reserved field of Slot Resource Table
¨ spRefNum short 2 38 Slot Resource Table reference number
´ spCategory short 2 40 sResource type: Category
´ spCType short 2 42 sResource type: Type
´ spDrvrSW short 2 44 sResource type: Driver software identifier
´ spDrvrHW short 2 46 sResource type: Driver hardware identifier
Æ spTBMask char 1 48 Type bit mask (bits 0..3 mask words 0..3)
´ spSlot char 1 49 Slot number
´ spID char 1 50 sResource list ID
´ spExtDev char 1 51 External device identifier
´ spHwDev char 1 52 Hardware device identifier
Returns: an operating system Error Code. It will be one of:
noErr (0) No error
smEmptySlot (-300) No card in slot.
smCRCFail (-301) CRC check failed.
smFormatErr (-302) FHeader format is not Apple's
smRevisionErr (-303) The revision of the card's declaration ROM is wrong.
smNoDir (-304) Directory offset is NIL
smNosInfoArray (-306) The SDM could not allocate memory for the sInfo
array.
smResrvErr (-307) A reserved field of the declaration ROM was used.
smUnExBusErr (-308) An unexpected bus error occurred.
smBLFieldBad (-309) A valid ByteLanes field was not found.
smDisposePErr (-312) An error occurred during execution of DisposPointer.
smNoBoardSRsrc (-313) There is no board sResource.
smGetPRErr (-314) Error during execution of sGetPRAMRec.
smNoBoardId (-315) There is no board ID.
smInitStatVErr (-316) The InitStatus_V field was negative after Primary or
Secondary Init.
smInitTblVErr (-317) Error while trying to initialize the sResource Table.
smNoJmpTbl (-318) Slot Manager jump table could not be created
smBadBoardId (-319) Board ID was wrong; reinit the PRAM record

Notes: Given an sResource type (category, cType, software, and hardware) and
spTBMask, and starting from a given slot number, spSlot, and sResource
list identification number, spID, the trap macro SNextTypeSRsrc
returns the slot number, spSlot, sResource list identification number,
spID, and Slot Resource Table ioReserved field (spIOReserved) for the
next sResource of that type, as masked. If there are no more sResources of
that type, SNextTypeSRsrc returns a nonfatal error report, which can
be one of the following:
smBadRefId (-330) Reference ID was not found in the given sResource
list.
smBadsList (-331) The IDs in the sResource list are not in ascending
order.
smReservedErr (-332) A reserved field was not zero.
smCodeRevErr (-333) Wrong revision of the code to be executed by sExec.
smCPUErr (-334) The CPU field of the code was wrong.
smsPointerNil (-335) LPointer is nil From sOffsetData. If this error occurs;
check sInfo rec for more information.
smNilsBlockErr (-336) The physical block size (of an sBlock) was zero.
smSlotOOBErr (-337) The given slot was out of bounds (or does not exist).
smSelOOBErr (-338) Selector out of bounds error
smNewPErr (-339) An error occurred during execution of NewPointer.
smCkStatusErr (-341) Status of slot is bad (InitStatus_A,V).
smGetDrvrNamErr (-342) An error occurred during execution of
sGetDrvrName.
smNoMoresRsrcs (-344) No more sResources.
smsGetDrvrErr (-345) An error occurred during execution of sGetDrvr.
smBadsPtrErr (-346) A bad sPointer was presented to sCalcsPointer.
smByteLanesErr (-347) NumByteLanes was determined to be zero.
smSRTOvrFlErr (-350) Slot Resource Table overflow.
smRecNotFnd (-351) Record not found in the Slot Resource Table.
The spTBMask field lets you mask off specific fields of the sResource type
that you do not care about, by setting any of bits 0-3. Bit 3 masks off the
spCategory field; bit 2 the spCType field; bit 1 the spDrvrSW field; and bit
0 the spDrvrHW field.